#!/usr/bin/env bash

curl localhost:9200/img_test/fulltext/_search -d '
{
"query": {
  "function_score" : {
    "query" : {
      "match_all" : {
        "boost" : 1.0
      }
    },
    "functions" : [
      {
        "filter" : {
          "match_all" : {
            "boost" : 1.0
          }
        },
        "script_score" : {
          "script" : {
            "inline" : "hamming_score",
            "lang" : "native",
            "params" : {
              "f" : "feature",
              "fea" : [1166029329, 1140891699, 437563654, 1222842496, 1208292044, 672399392, 342796354, 83960832, 1086327364, 1248624754, 710152418, 302260272, 34668642, 336089108, 2231502084, 680267144, 608445505, 13145176, 2168982595, 2148282482, 1141064960, 1619526209, 1610648005, 136381249, 2151689283, 1121200208, 49188, 1616142337, 2183840274, 2215659268, 151593032, 3758625601, 809638067, 5810034, 536871952, 491127808, 1623767173, 1107345484, 5242925, 269, 134496832, 201326594, 101208064, 1185417234, 1180704, 11014144, 404783372, 1094714139, 2164339474, 639664385, 37798322, 16777220, 2214593027, 1074339848, 5259714, 83956736, 2449473680, 37384, 2030742192, 451379364, 2743571062, 316447696, 438892, 2288144726],
              "verbose" : true
            }
          }
        }
      }
    ],
    "score_mode" : "sum",
    "boost_mode" : "replace",
    "max_boost" : 3,
    "boost" : 1.0
  }
 }
}'